using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Outpatient.Doman.SmartClinic
{
    /// <summary>
    /// 门诊结账实体类
    /// </summary>
    [Table("Checkout")]
    public class Checkout
    {
        /// <summary>
        /// 结账ID（主键）
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int CheckoutId { get; set; }

        /// <summary>
        /// 挂号单号
        /// </summary>
        [Required]
        [StringLength(50)]
        public string RegisterNo { get; set; }

        /// <summary>
        /// 病人姓名
        /// </summary>
        [Required]
        [StringLength(100)]
        public string PatientName { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        [Required]
        [Column(TypeName = "decimal(18,2)")]
        public decimal TotalAmount { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        [Required]
        [Column(TypeName = "decimal(18,2)")]
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 找零金额
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal ChangeAmount { get; set; }

        /// <summary>
        /// 结账时间
        /// </summary>
        [Required]
        public DateTime CheckoutTime { get; set; }

        /// <summary>
        /// 发票号
        /// </summary>
        [StringLength(50)]
        public string InvoiceNumber { get; set; }

        /// <summary>
        /// 是否打印发票
        /// </summary>
        public bool PrintInvoice { get; set; }

        /// <summary>
        /// 操作员ID
        /// </summary>
        public int? OperatorId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string Remarks { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDelete { get; set; }
    }
} 